package cn.buk.tms.entity.order;

import jakarta.persistence.*;
import java.util.Date;

/**
 * 订单号信息
 * @author yfdai
 */
@Entity
@Table(name="seqtable", uniqueConstraints=@UniqueConstraint(name="uk_OrderNoGenaration_enterprise_id_seqname", columnNames={"enterprise_id", "seqname"}))
public class OrderNoInfo {

	public static final String ORDER_FLIGHT = "1001"; // 机票订单前缀
	public static final String ORDER_FLIGHT_REFUND = "1002"; //机票退票单前缀
	public static final String ORDER_FLIGHT_CHANGE = "1005"; //机票改签单前缀
	public static final String ORDER_FLIGHT_WX = "1011"; // 机票订单前缀(微信公众号）
	public static final String ORDER_FLIGHT_WW = "1012"; // 机票订单前缀(企业微信）

	public static final String ORDER_HOTEL = "1101"; // 酒店订单前缀
	public static final String ORDER_TRAIN = "1201"; // 火车票订单前缀
	public static final String ORDER_TRAIN_REFUND = "1202"; // 火车票退票单前缀

	public static final String ORDER_INSURANCE = "1501"; // 保险订单前缀
	public static final String ORDER_VAS = "1601"; // 增值服务订单前缀 value added service

	public static final String ORDER_RENTAL_CAR = "1701"; // 租车订单前缀
	public static final String ORDER_RENTAL_CAR_SELF_SERVICE = "1702"; // 租车订单前缀（EOTMS）



	public static final String BILL_FLIGHT = "2001"; //机票账单前缀
	public static final String BILL_FLIGHT_REFUND = "2002"; //机票退票账单前缀
	public static final String BILL_FLIGHT_CHANGE = "2005"; //机票改签账单前缀
	public static final String BILL_VAS = "2006"; //服务账单前缀

	public static final String BILL_HOTEL = "2101"; //酒店账单前缀
	public static final String BILL_TRAIN = "2201"; //火车票账单前缀
	public static final String BILL_RENTAL_CAR = "2701"; //租车账单前缀

	public static final String ENT_RECEIPT = "8001"; //企业收款单前缀

	/**
	 * 数据模板
	 */
	public static final String DATA_TEMPLATE = "9001";

	/**
	 * 配送单单号前缀
	 */
	public static final String DELIVERY_NOTE = "9000";


	@Id
	@GeneratedValue
	private int id;

	@Column(name="enterprise_id")
	private int enterpriseId;

    @Column(name="seqname", length=30)
	private String orderType;

    @Column(name="seqvalue")
	private int orderNoValue;

    @Temporal(TemporalType.TIMESTAMP)
	@Column(name = "create_time", insertable = false, updatable = false)
    private Date createTime;

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "last_update", insertable = false)
    private Date lastUpdate;

	/**
	 * @return the id
	 */
	public int getId() {
		return id;
	}

	/**
	 * @param id the id to set
	 */
	public void setId(int id) {
		this.id = id;
	}





	/**
	 * @return the orderNoValue
	 */
	public int getOrderNoValue() {
		return orderNoValue;
	}

	/**
	 * @param orderNoValue the orderNoValue to set
	 */
	public void setOrderNoValue(int orderNoValue) {
		this.orderNoValue = orderNoValue;
	}

	/**
	 * @return the enterpriseId
	 */
	public int getEnterpriseId() {
		return enterpriseId;
	}

	/**
	 * @param enterpriseId the enterpriseId to set
	 */
	public void setEnterpriseId(int enterpriseId) {
		this.enterpriseId = enterpriseId;
	}

    public String getOrderType() {
        return orderType;
    }

    public void setOrderType(String orderType) {
        this.orderType = orderType;
    }

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public Date getLastUpdate() {
		return lastUpdate;
	}

	public void setLastUpdate(Date lastUpdate) {
		this.lastUpdate = lastUpdate;
	}
}
